package com.lzj.server.common.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

@Schema(name = "Log", description = "日志表")
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_log")
public class Log {
    @TableId(value = "id", type = IdType.AUTO)
    @Schema(description = "主键ID，自增")
    private Long id;
    @Schema(description = "用户ID")
    @TableField(value = "user_id")
    private Long userId;
    @Schema(description = "日志类型")
    @TableField(value = "log_type")
    private String logType;
    @Schema(description = "操作对象ID")
    @TableField(value = "obj_id")
    private Long objId;
    @Schema(description = "操作内容")
    @TableField(value = "content")
    private String content;
    @Schema(description = "ip地址")
    @TableField("ip_address")
    private String ipAddress;
    @Schema(description = "用户代理")
    private String userAgent;
    @Schema(description = "创建时间")
    @TableField(value = "create_time")
    private LocalDateTime createTime;

}
